<%inherit file="base.html"/>
<%def name="head()">
<script>
% if not permit.match(current_user.username, '/admin/param/update'):
    $(document).ready(function (){
        $("input").each(function() {
            $(this).attr("readonly", 'readonly');
        })
        $("textarea").each(function() {
            $(this).attr("readonly", 'readonly');
        })
        $("#submit").hide();
    });
% endif

$(function () {
    $('[data-toggle="popover"]').popover()
});

</script>
</%def>
<%def name="body()">
<section class="content">
    <div class="box box-primary">
        <div class="box-header">
            <i class="fa fa-cog"></i>
            <h3 class="box-title">系统参数管理</h3>
        </div>
        <div class="box-body">
            <div class="container">
            <div role="tabpanel">

                <!-- Nav tabs -->
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="${active=='syscfg' and 'active' or '' }">
                        <a href="#syscfg" aria-controls="syscfg" role="tab" data-toggle="tab">管理设置</a>
                    </li>
                    <li role="presentation" class="${active=='toughcloudcfg' and 'active' or '' }">
                        <a href="#toughcloudcfg" aria-controls="toughcloudcfg" role="tab" data-toggle="tab">硬派云服务</a>
                    </li>
                    <li role="presentation" class="${active=='notifycfg' and 'active' or '' }">
                        <a href="#notifycfg" aria-controls="notifycfg" role="tab" data-toggle="tab">到期提醒设置</a>
                    </li>
                    <li role="presentation" class="${active=='mailcfg' and 'active' or '' }">
                        <a href="#mailcfg" aria-controls="mailcfg" role="tab" data-toggle="tab">邮件服务设置</a>
                    </li>
                    <li role="presentation" class="${active=='radcfg' and 'active' or '' }">
                        <a href="#radcfg" aria-controls="radcfg" role="tab" data-toggle="tab">Radius设置</a>
                    </li>
                </ul>

                <!-- Tab panes -->
                <div class="tab-content">
                    <div role="tabpanel" class="tab-pane ${active=='syscfg' and 'active' or '' }" id="syscfg">
                        <form class="form-horizontal form-well" role="form" action="${sys_form.action}" method="post">
                            ${xsrf_form_html()}
                            ${sys_form.render_css()}
                        </form>
                    </div>
                    <div role="tabpanel" class="tab-pane ${active=='toughcloudcfg' and 'active' or '' }" id="toughcloudcfg">
                        <form class="form-horizontal form-well" role="form" action="${toughcloud_form.action}" method="post">
                            ${xsrf_form_html()}
                            ${toughcloud_form.render_css()}
                        </form>
                    </div>
                     <div role="tabpanel" class="tab-pane ${active=='notifycfg' and 'active' or '' }" id="notifycfg">
                        <form class="form-horizontal form-well" role="form" action="${notify_form.action}" method="post">
                            ${xsrf_form_html()}
                            ${notify_form.render_css()}
                        </form>
                    </div>
                    <div role="tabpanel" class="tab-pane ${active=='mailcfg' and 'active' or '' }" id="mailcfg">
                        <form class="form-horizontal form-well" role="form" action="${mail_form.action}" method="post">
                            ${xsrf_form_html()}
                            ${mail_form.render_css()}
                        </form>
                    </div>
                    <div role="tabpanel" class="tab-pane ${active=='radcfg' and 'active' or '' }" id="radcfg">
                        <form class="form-horizontal form-well" role="form" action="${rad_form.action}" method="post">
                            ${xsrf_form_html()}
                            ${rad_form.render_css()}
                        </form>
                    </div>
                </div>

            </div>

        </div>
    </div>
</div>
</div>
    </section>
</%def>